/*
 * @Author       : NaN 353362604@qq.com
 * @Date         : 2023-08-16 08:56:38
 * @LastEditTime : 2023-08-27 10:22:02
 * @LastEditors  : NaN 353362604@qq.com
 * @FilePath     : \AdminStration\src\Pages\Front\jtgj\Other\SevA01.jsx
 * @Description  :
 */
import { useRequest } from 'ahooks'
import { useState } from 'react'
import { useEffect } from 'react'
import { Http } from '../../../Common/Api'
import { CommonSmallTitle } from '../Assets/Common/SmallTitle'
import { FilingCabinet003 } from '../Assets/Template/FilingCabinet'

export const SevA01 = () => {
    const [Number, setNumber] = useState()
    const { runAsync } = useRequest(Http, {
        manual: true,
        onSuccess: res => setNumber(res.list.reduce((acc, item) => ({ ...acc, [item.uuid]: item.num }), {})),
    })

    useEffect(() => {
        runAsync({ url: 'getconstructionGetInfoTypeManageAllStat' })
    }, [runAsync])

    return (
        <>
            <CommonSmallTitle title="集团文件" style={{ marginRight: 16 }}>
                <FilingCabinet003 infoTypeManageUuid="93a0b342-fdd5-4cd8-a215-8945bb5e1a34" Number={Number} />
            </CommonSmallTitle>
            <CommonSmallTitle title="工建文件" style={{ marginRight: 16 }} flex={2}>
                <FilingCabinet003 infoTypeManageUuid="2cb35ef9-a4ab-484b-b155-d16054049af7" Number={Number} />
            </CommonSmallTitle>
            <CommonSmallTitle title="视频文件">
                <FilingCabinet003 infoTypeManageUuid="6f562692-c883-4c39-924c-099438a8a757" Number={Number} />
            </CommonSmallTitle>
        </>
    )
}
